package org.jeecg.modules.flower.exception;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
@Slf4j
public class FlowerLoseExceptionHandler {
    /**
     * 处理自定义异常
     */
    @ExceptionHandler(FlowerLoseNumException.class)
    public Result<?> handleRRException(FlowerLoseNumException e){
        log.error(e.getMessage(), e);
        return Result.error(e.getMessage());
    }
}
